package com.imooc.product.exception;

import com.imooc.product.enums.ResultEnum;
import lombok.Getter;

/**
 * SellException
 * 异常信息
 *
 * @author leon.cheng
 * @date 2018/11/20 17:09
 **/
@Getter
public class SellException extends RuntimeException {
    private Integer code;

    public SellException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }
    public SellException(Integer code,String message) {
        super(message);
        this.code = code;
    }
}
